-
Notifications
You must be signed in to change notification settings - Fork 51
feat(desktop): enforce minimum supported version #547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Expand this to see my work.
|
🚀 Preview Deployment🔗 Preview Links
Preview updates automatically with new commits |
|
Nice end-to-end implementation: API surface is tiny, desktop fails open on config fetch/parse issues, and the “Update required” UI is clear. A few concrete things I’d tighten up before merging (mostly reliability / long-term maintainability): 1) Make the API response explicitly non-cacheable (remote config should actually be “remote”) Suggestion: set // apps/api/src/app/api/public/desktop/version/route.ts
export const dynamic = "force-dynamic";
export function GET() {
return Response.json(
{ minimumSupportedVersion: env.DESKTOP_MINIMUM_SUPPORTED_VERSION ?? null },
{ headers: { "Cache-Control": "no-store" } },
);
}2) Semver parsing/comparison: either reuse a proven impl, or add guardrails/tests Two specific nits if you keep the custom version:
Given this is a “hard gate,” I’d strongly consider either:
3) Version gate invalid-semver warning is a bit misleading 4) Auto-update subscriptions still run even when “disabled” (minor perf + duplicate listeners) Suggested refactor: split 5) Small nits
Overall this looks close; the main “I’d really like to see this” item is the non-cacheable config endpoint, since caching would undermine the core purpose of the feature. |
Adds a remotely-configurable minimum supported desktop version gate (to unblock auth migrations).
Changes
GET /api/public/desktop/versionreturning{ minimumSupportedVersion }fromDESKTOP_MINIMUM_SUPPORTED_VERSION.app.getVersion(), and computeversionGatestatus.currentVersion < minimumSupportedVersion.Notes
Verification
bun run lint -- apps/desktop apps/api bun run typecheck -- --filter=@superset/desktop --filter=@superset/api bun run test -- --filter=@superset/desktop --filter=@superset/api